import {React,Component} from 'react'
import Dialog from './Dialog'
import List from './List'

class Contact extends Component {
    state={
        flag:false,
      }
    showHide=()=>{
        this.setState({
            flag:!this.state.flag
        })
    }
    render(){
        return <div>
            <List showHide={this.showHide}></List>
            <button onClick={this.showHide}>新建联系人</button>
            <Dialog flag={this.state.flag} showHide={this.showHide}></Dialog>
        </div>
    }
}

export default Contact